package com.aaa.sb.service;

import com.aaa.sb.dao.EmpDao;
import com.aaa.sb.entity.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * className:EmpService
 * discription:
 * author:luRuiHua
 * createTime:2018-11-23 11:32
 */
@Service
public class EmpServiceImpl implements EmpService{
    @Autowired
    private EmpDao empDao;
    /**
     * 根据部门编号查询（存储过程的调用）
     * @return
     */
    @Override
    public List<Emp> getListByPro(Map map) {
        //调用dao执行call调用存储过程
        //出参需要执行完成后，放入map
        empDao.getListByPro(map);
        return (List<Emp>)map.get("empList");
    }

}
